package com.soft.collateral.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 外估机构表
 * </p>
 *
 * @author liubin
 * @since 2025-07-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("agencies")
@ApiModel(value="Agencies对象", description="外估机构表")
public class Agencies implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "机构编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "机构名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "机构地址")
    @TableField("address")
    private String address;

    @ApiModelProperty(value = "联系电话")
    @TableField("phone")
    private String phone;

    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "Asia/Shanghai")
    @ApiModelProperty(value = "创建时间")
    @TableField("created_at")
    private LocalDate createdAt;

}
